<include file="Public/head"/>
<link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" type="text/css" />
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
<style>
table th{
    font-size: 19px;
    color:#000;
}
table td{
    font-size: 16px;
    /*color:#000;*/
}

</style>
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                    <div class="row">
                    <div class="col-xs-12">
                        
                        <div style="float:left;margin-top:3px;margin-right:0px;width:10%;font-size:16px;">
                            
                                <input type="button"  value="导入绩效表格" class=" btn-info"  style="width:130px;height:50px;" onclick="dao()"    />
                        
                        </div>
                        <div style="margin-top:5%;"></div>
                        <!-- <form id="form" method="post" action="{:U('Shenp/ytong')}" style="margin-top:5%;"> -->
                        <table class="table table-hover" >
                            <thead>
                                <tr>
                                    <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                    <th class="center">填表人姓名</th>
                                    <th class="center">所属部门/岗位</th>
                                    <!-- <th class="center">所属岗位</th> -->
                                    <th class="center">绩效月</th>
                                    <th class="center">表格类型</th>
                                    <th class="center">得分</th>
                                    <th class="center">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="list" id="v">
                                    <tr>
                                        <td class="center">
                                            <input class="uids" type="checkbox" name="uids[]" value="{$v['id']}">
                                        </td>
                                        <td class="center">{$v.uname}</td>
                                        <td class="center">{$v.ment}</td>
                                        <!-- <td class="center">{$v.post}</td> -->
                                        <td class="center">{$time} - {$v.k_time}</td>
                                        <td class="center">{$v.bming}</td>
                                        <?php if(empty($v['zong'])): ?>
                                            <td class="center">未得分</td>
                                        <?php else: ?>
                                            <td class="center info">{$v.zong}</td>
                                        <?php endif ?>
                                        <td class="center"><a href="{:U('xiang',array('uid'=>$v['uid'],'yue'=>$v['k_time']))}" class="layui-btn layui-btn-danger layui-btn-radius">查看表</a></td>
                                       
                                    </tr>  
                                </volist>
                            </tbody>
                        </table>
                        <!-- </form> -->


                    </div>
                    </div>
                    
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/qwadmin/js/date-time/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__/qwadmin/js/function.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">
$(".check-all").click(function () {
            $(".uids").prop("checked", this.checked);
        });
$(".uids").click(function () {
        var option = $(".ids");
        option.each(function (i) {
            if (!this.checked) {
                $(".check-all").prop("checked", false);
                return false;
            } else {
                $(".check-all").prop("checked", true);
            }
        });
    });

$("#submit").click(function () {
            
         //询问框
    layer.confirm('确定通过么 ( ・◇・)？', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
             type: "POST",
             url:"{:U('Shenp/qtong')}",
             data:$('#form').serialize(),// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                if (msg == 1111) {
                    layer.msg('已通过!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                    history.go(0); 
                }else{
                    layer.msg('申请失败,请重新再试!');
                }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });   
            
});


function dao()
{
    layer.open({
        type: 1,
        title:  ['导入绩效表格', 'font-size:17px;'],
        skin: 'demo-class', //加上边框
        area: ['330px', '420px'], //宽高
        content: $('#dao'),
        // btn:'按钮'
    });
}

</script>
</body>
</html>



    <div id="dao" class="row" style="display:none;width:100%;"> 
        <form action="{:U('eadd')}" style="margin-left:20%;" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label for="exampleInputEmail1" style="margin-top:10px;">考核部门:</label>
            <select class="form-control" name="bu" style="width:200px;text-align:center;">
                <volist name="glist" id="g">
                    <if condition="$g['post'] neq ''">
                        <option value="{$g.post}">{$g.post}</option>
                    <else/>
                        <option value="">请选择</option>
                    </if>
                    
                   
                </volist>
            </select>
        </div>
       <div class="form-group">
            <label for="exampleInputEmail1" style="margin-top:10px;">考核岗位:</label>
            <select class="form-control" name="gwei" style="width:200px;text-align:center;">
                <volist name="ulist" id="go">
                    <if condition="$go['post'] neq ''">
                        <option value="{$go.post}">{$go.post}</option>
                    <else/>
                        <option value="">请选择</option>
                    </if>
                    
                   
                </volist>
            </select>
        </div>
        <div class="form-group">
            <label for="exampleInputEmail1" style="margin-top:10px;">绩效月:</label><br>
            <input type="date" name="j_time" style="width:200px;">
        </div>

        <input  type="file" name="file" />
                        
        <button type="submit" class="btn-info" style="width:85px;height:40px;font-size:17px;margin-left:20%;margin-top:20px;">确定导入</button>


        </form>


    </div>